<style type="text/css">
    .sm-st {
        background: #fff;
        padding: 20px;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        margin-bottom: 20px;
        -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
    }

    .sm-st-icon {
        width: 60px;
        height: 60px;
        display: inline-block;
        line-height: 60px;
        text-align: center;
        font-size: 30px;
        background: #eee;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
        float: left;
        margin-right: 10px;
        color: #fff;
    }

    .sm-st-info {
        font-size: 12px;
        padding-top: 2px;
    }

    .sm-st-info span {
        display: block;
        font-size: 24px;
        font-weight: 600;
    }

    .orange {
        background: #fa8564 !important;
    }

    .tar {
        background: #45cf95 !important;
    }

    .sm-st .green {
        background: #86ba41 !important;
    }

    .pink {
        background: #AC75F0 !important;
    }

    .yellow-b {
        background: #fdd752 !important;
    }

    .stat-elem {

        background-color: #fff;
        padding: 18px;
        border-radius: 40px;

    }

    .stat-info {
        text-align: center;
        background-color: #fff;
        border-radius: 5px;
        margin-top: -5px;
        padding: 8px;
        -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        font-style: italic;
    }

    .stat-icon {
        text-align: center;
        margin-bottom: 5px;
    }

    .st-red {
        background-color: #F05050;
    }

    .st-green {
        background-color: #27C24C;
    }

    .st-violet {
        background-color: #7266ba;
    }

    .st-blue {
        background-color: #23b7e5;
    }

    .stats .stat-icon {
        color: #28bb9c;
        display: inline-block;
        font-size: 26px;
        text-align: center;
        vertical-align: middle;
        width: 50px;
        float: left;
    }

    .stat {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    .stat .value {
        font-size: 20px;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
    }

    .stat .name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat.lg .value {
        font-size: 26px;
        line-height: 28px;
    }

    .stat.lg .name {
        font-size: 16px;
    }

    .stat-col .progress {
        height: 2px;
    }

    .stat-col .progress-bar {
        line-height: 2px;
        height: 2px;
    }

    .item {
        padding: 30px 0;
    }



    #statistics .panel {
        min-height: 150px;
    }

    #statistics .panel h5 {
        font-size: 13px;
    }
    h3.popover-title span {
        text-decoration: underline;
        cursor:pointer;
        font-weight: bold;
        color:#3498db;
    }
    h3.popover-title span:hover {text-decoration: none;}
    h3.popover-title a {text-decoration: underline;}
    h3.popover-title a:hover {text-decoration: none;}
    .popover-content {padding-left: 0;}

    #roomstatus-list .box.box-info {
        box-shadow:0 0 black;
    }
    #roomstatus-list .popover {
        max-width: 2000px;
        min-width: 200px;
        width:340px;
    }
    #roomstatus-list .context-menu {}
    #roomstatus-list .context-menu.row {padding-left:15px;}
    #roomstatus-list .context-menu a {
        display: inline-block;
        margin-bottom: 0.5rem;
    }
    #roomstatus-list .context-menu a i {font-size:130%;}
    #roomstatus-list .box-header {padding:6px 5px;background: #f1f1f1;}
    #roomstatus-list .thumbnail {padding:0;}
    #roomstatus-list .thumbnail.checkined {
        border:1px solid #3498db;
    }
    #roomstatus-list .thumbnail.checkined .box-header {
        background: #3498db;
    }
    #roomstatus-list .thumbnail.checkined .room_no {
        background: #fff;
        color: #3498db;
    }
    #roomstatus-list .thumbnail.checkined dt {color: #3498db;}
    #roomstatus-list .thumbnail span.label.pull-right {margin-left: 0.2rem;}
    #roomstatus-list dl {padding:0 5px;}
    #roomstatus-list a dt, #roomstatus-list a dd {color:#111;}
    #roomstatus-list a dt {font-size: 1.5rem;}
    #roomstatus-list a dd {font-size: 0.8rem;}
    .btn-context {height: 120px;}
    .btn-context dl {margin-top: 0.5rem;}

    .box-header .box-title .label {font-size: 1.5rem;padding:0.2em 1em .3em;margin-left: 0.5rem;} 
</style>

<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#one" data-toggle="tab">前台营业（房态盘）</a></li>
<!--            <li><a href="#reserve" data-toggle="tab">查看预定</a></li>-->
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="row" style="margin-bottom: 1rem;">
                    <div class="col-xs-12">
                        <a href="" class="btn btn-primary" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                        <a href="pmsroomstatus" class="btn {if $t == ''}btn-danger{else}btn-default{/if}">全部({$room_all_count})</a>
                        <a href="pmsroomstatus?t=room_full" class="btn {if $t == 'room_full'}btn-danger{else}btn-default{/if}">有住人({$room_full_count})</a>
<!--                        <a href="pmsroomstatus?t=room_reserve" class="btn {if $t == 'room_reserve'}btn-danger{else}btn-default{/if}">有预订({$room_reserve_count})</a>-->
<!--                        <a href="pmsroomstatus?t=room_empty" class="btn {if $t == 'room_empty'}btn-danger{else}btn-default{/if}">空床({$room_empty_count})</a>-->
                        <a href="pmsroomstatus?t=room_dirty" class="btn {if $t == 'room_dirty'}btn-danger{else}btn-default{/if}">脏床({$room_dirty_count})</a>
                        <a href="pmsroomstatus?t=room_repair" class="btn {if $t == 'room_repair'}btn-danger{else}btn-default{/if}">维修({$room_repair_count})</a>
                        <a href="pmsroomstatus?t=room_lock" class="btn {if $t == 'room_lock'}btn-danger{else}btn-default{/if}">锁床({$room_lock_count})</a>

                        <div class="pull-right">
                            <form class="form-horizontal" role="form" data-toggle="validator" method="GET" action="">
                                <div class="form-inline">
                                    <ins><input type="text" class="form-control input-inline datetimepicker" placeholder="住院时间" data-date-format=" YYYY-MM-DD" id="search_start_date" value="{$start_date}"/></ins>
                                    <ins><input type="text" class="form-control input-inline datetimepicker" placeholder="出院时间" data-date-format=" YYYY-MM-DD" id="search_end_date" value="{$end_date}"/></ins>
                                    <ins><button type="button" class="btn btn-info" id="js_SearchRoom">查询可预定的空床</button></ins>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

                <div class="row" id="roomstatus-list">
                    {volist name="riList" id="item"}
                    <div class="col-xs-12">
                        <div class="box box-info">
                            <div class="box-header with-border">
                                <h4 class="box-title"><span class="label label-info">{$item['floor']} 房间</span></h4>
                                <div class="box-tools pull-right">
                                    <!-- <a href="#" target="_blank">
                                        <span class="label label-success pull-right">更多</span>
                                    </a> -->
                                </div>
                            </div>
                            <div class="box-body">
                                <div class="row">
                                    {volist name="$item['rooms']" id="room"}
                                    <div class="col-md-2 col-sm-4 col-xs-6" style="padding-left: 5px;padding-right: 5px;">
                                        <a href="javascript:;" class="thumbnail btn-context{if $room['room_status'] == 1} checkined{/if}"
                                           data-id="{$room['id']}" data-title="{$room['room_type_name']}" data-room_no="{$room['room_no']}"
                                           data-room_status="{$room['room_status']}"
                                           data-is_dirty="{$room['is_dirty']}" data-is_repair="{$room['is_repair']}"
                                           data-is_lock="{$room['is_lock']}" data-order_id="{$room['order_id']}" data-room="{$item['floor']}"
                                           {eq name="$room['over_date'] ?? 0" value="1"}style="border-color:#ea2e2e;"{/eq}
                                        {eq name="$room['order_status'] ?? 0" value="-1"}style="border-color:#128f76;"{/eq}>
                                            <div class="box-header"
                                                 {eq name="$room['order_status'] ?? 0" value="-1"}style="background:#128f76;"{/eq}
                                                 {eq name="$room['over_date'] ?? 0" value="1"}style="background:#ea2e2e;"{/eq} >
                                                <span class="label label-default room_no">{$room['room_no']}</span>
                                                {if $room['is_lock']}
                                                <span class="label label-danger pull-right" data-toggle="tooltip" data-original-title="锁床">锁</span>
                                                {/if}
                                                {if $room['is_dirty']}
                                                <span class="label label-warning pull-right" data-toggle="tooltip" data-original-title="脏床">脏</span>
                                                {/if}
                                                {if $room['is_repair']}
                                                <span class="label label-warning pull-right" data-toggle="tooltip" data-original-title="维修床">修</span>
                                                {/if}
                                            </div>
                                            <dl>
                                                <dt>
                                                    {$room['room_type_name']} 
                                                    {if $room['deposit_flag']}
                                                    <span class="label label-danger" data-toggle="tooltip" data-placement="right" data-original-title="押金：&yen;{$room['deposit']}">欠押金</span>
                                                    {/if}
                                                </dt>

                                                {if $room['room_status']}
                                                <dd>患者：{$room['stay_name']} 家属：{$room['customers']}</dd>
                                                <dd>住院时间：{$room['check_in_time']}</dd>
                                                <dd>预计出院：{$room['check_out_time']}</dd>
                                                {/if}
                                            </dl>
                                        </a>
                                    </div>
                                    {/volist}
                                </div>
                            </div>
                        </div>
                    </div>
                    {/volist}
                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="reserve" style="padding: 0 15px;">
                <div id="toolbar" class="toolbar">
                    <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                </div>
                <table id="reserve_table" class="table table-striped table-bordered table-hover table-nowrap" width="100%">
            </div>
        </div>
    </div>
</div>